<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet 
  version="1.0" 
  exclude-result-prefixes="x d xsl msxsl cmswrt"
  xmlns:x="http://www.w3.org/2001/XMLSchema" 
  xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" 
  xmlns:cmswrt="http://schemas.microsoft.com/WebParts/v3/Publishing/runtime"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">
	<xsl:template name="Default" match="*" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-left">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
			<div class="link-item">
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="$DisplayTitle"/>
				</a>
				<div class="description">
					<xsl:value-of select="@Description" />
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template name="NoImage" match="Row[@Style='NoImage']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item link-item">
			<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
			<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
				<xsl:value-of select="$DisplayTitle"/>
			</a>
			<div class="description">
				<xsl:value-of select="@Description" />
			</div>
		</div>
	</xsl:template>
	<xsl:template name="TitleOnly" match="Row[@Style='TitleOnly']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item link-item">
			<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
			<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
				<xsl:value-of select="$DisplayTitle"/>
			</a>
		</div>
	</xsl:template>
	<xsl:template name="TitleWithBackground" match="Row[@Style='TitleWithBackground']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div class="title-With-Background">
			<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
			<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
				<xsl:value-of select="$DisplayTitle"/>
			</a>
		</div>
	</xsl:template>
	<xsl:template name="Bullets" match="Row[@Style='Bullets']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item link-item bullet">
			<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
			<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
				<xsl:value-of select="$DisplayTitle"/>
			</a>
		</div>
	</xsl:template>
	<xsl:template name="ImageRight" match="Row[@Style='ImageRight']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-right">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
			<div class="link-item">
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="$DisplayTitle"/>
				</a>
				<div class="description">
					<xsl:value-of select="@Description" />
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template name="ImageTop" match="Row[@Style='ImageTop']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="Url" select="@LinkUrl"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-top">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
			<div class="link-item">
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="$DisplayTitle"/>
				</a>
				<div class="description">
					<xsl:value-of select="@Description" />
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template name="ImageTopCentered" match="Row[@Style='ImageTopCentered']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item centered">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-top">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
			<div class="link-item">
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="$DisplayTitle"/>
				</a>
				<div class="description">
					<xsl:value-of select="@Description" />
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template name="LargeTitle" match="Row[@Style='LargeTitle']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-left">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
			<div class="link-item-large">
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="$DisplayTitle"/>
				</a>
				<div class="description">
					<xsl:value-of select="@Description" />
				</div>
			</div>
		</div>
	</xsl:template>
	<xsl:template name="ClickableImage" match="Row[@Style='ClickableImage']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-left">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
		</div>
	</xsl:template>
	<xsl:template name="NotClickableImage" match="Row[@Style='NotClickableImage']" mode="itemstyle">
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-left">
					<img class="image" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
				</div>
			</xsl:if>
		</div>
	</xsl:template>
	<xsl:template name="FixedImageSize" match="Row[@Style='FixedImageSize']" mode="itemstyle">
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-left">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image-fixed-width" src="{$SafeImageUrl}" alt="{@ImageUrlAltText}"/>
					</a>
				</div>
			</xsl:if>
			<div class="link-item">
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="$DisplayTitle"/>
				</a>
				<div class="description">
					<xsl:value-of select="@Description" />
				</div>
			</div>
		</div>
	</xsl:template>

	<xsl:template name="PLTGridITResourceAllocation" match="Row[@Style='PLTGridITResourceAllocation']" mode="itemstyle">

		<!-- 
      ContentMain.xsl passes CurPos and Last.
      We use these to conditionally emit the open and closing <table> tags.
    -->
		<xsl:param name="CurPos" />
		<xsl:param name="Last" />

		<!-- The following variables are unmodified from the standard ItemStyle.xsl -->
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>

		<!--
      Here we define a variable, "tableStart".  This contains the HTML
      that we use to define the opening of the table as well as the column
      labels.  Note that if CurPos = 1, it includes the HTML in a CDATA tag.
      Otherwise, it will be empty.
      
      The value of tableStart is emited every time ItemStyle is called via 
      ContentQueryMain.xsl.
    -->
		<xsl:variable name="tableStart">
			<xsl:if test="$CurPos = 1">
				<![CDATA[ 
        <table width="100%"  cellspacing="0" cellpadding="2" border="0" class="ms-listviewtable">
          <tr>
            <td class="ms-vh2">Project Title</td>
            <td class="ms-vh2">Role</td>
            <td class="ms-vh2">% Allocation</td>
          </tr>   
        ]]>
			</xsl:if>
		</xsl:variable>

		<!-- 
      Another variable, tableEnd simply defines the closing table tag.
      
      As with tableStart, it's always emited.  This is why its value is 
      assigned conditionally based upon whether we've been passed the last
      row by ContentQueryMain.xsl.
    -->
		<xsl:variable name="tableEnd">
			<xsl:if test="$CurPos = $Last">
				<![CDATA[ </table> ]]>
			</xsl:if>
		</xsl:variable>

		<!-- 
      Always emit the contents of tableStart.  If this is not the first
      row passed to us by ContentQueryMain.xsl, then we know its value
      will be blank.
      
      Disable output escaping because when tableStart it not blank, it
      includes actual HTML that we want to be rendered by the browser.  If
      we don't tell the XSL parser to disable output escaping, it will generate
      stuff like "&lt;table&gt;" instead of "<table>".
    -->
		<xsl:value-of select="$tableStart" disable-output-escaping="yes"/>
		<tr>
			<xsl:if test="$CurPos mod 2 = 0" ddwrt:cf_ignore="1">
				<xsl:attribute name="class">ms-alternating</xsl:attribute>
			</xsl:if>
			<td>
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="@ProjectName" />
				</a>
			</td>
			<td align="left">
				<xsl:value-of select="@ProjectRole" />
			</td>
			<td align="left">
				<xsl:value-of select="format-number(@ProjectAllocation, &quot;#,##0.%;-#,##0.%&quot;)" />
			</td>

			<!-- 
        All of the following is commented out to clarify things.
        However, bring it back and stuff it into a <td> to see its 
        effect.
      -->
			<!--
        <div id="linkitem" class="item">
          <xsl:if test="string-length($SafeImageUrl) != 0">
            <div class="image-area-left">
              <a href="{$SafeLinkUrl}" target="{$LinkTarget}">
                <img class="image-fixed-width" src="{$SafeImageUrl}"                      alt="{@ImageUrlAltText}"/>
              </a>
            </div>
          </xsl:if>
          <div class="link-item">
            <xsl:call-template                  name="OuterTemplate.CallPresenceStatusIconTemplate"/>
            <a href="{$SafeLinkUrl}"                    target="{$LinkTarget}" title="{@LinkToolTip}">
              <xsl:value-of select="$DisplayTitle"/>
            </a>
            <div class="description">
              <xsl:value-of select="@Description" />
            </div>

          </div>

        </div>

-->
		</tr>

		<!-- 
      Emit the closing table tag.  If we are not on the last row,
      this will be blank.
    -->
		<xsl:value-of select="$tableEnd" disable-output-escaping="yes"/>

	</xsl:template>
	<xsl:template name="PLTGridITMilestones" match="Row[@Style='PLTGridITMilestones']" mode="itemstyle">
		<!-- 
      ContentMain.xsl passes CurPos and Last.
      We use these to conditionally emit the open and closing <table> tags.
    -->
		<xsl:param name="CurPos" />
		<xsl:param name="Last" />

		<!-- The following variables are unmodified from the standard ItemStyle.xsl -->
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>

		<!--
      Here we define a variable, "tableStart".  This contains the HTML
      that we use to define the opening of the table as well as the column
      labels.  Note that if CurPos = 1, it includes the HTML in a CDATA tag.
      Otherwise, it will be empty.
      
      The value of tableStart is emited every time ItemStyle is called via 
      ContentQueryMain.xsl.
    -->
		<xsl:variable name="tableStart">
			<xsl:if test="$CurPos = 1">
				<![CDATA[ 
        <table width="100%"  cellspacing="0" cellpadding="2" border="0" class="ms-listviewtable">
          <tr>
            <td class="ms-vh2">Title</td>
            <td class="ms-vh2">Start Date</td>
            <td class="ms-vh2">End Date</td>
            <td class="ms-vh2">Schedule Status</td>
            <td class="ms-vh2">% Complete</td>
          </tr>   
        ]]>
			</xsl:if>
		</xsl:variable>

		<!-- 
      Another variable, tableEnd simply defines the closing table tag.
      
      As with tableStart, it's always emited.  This is why its value is 
      assigned conditionally based upon whether we've been passed the last
      row by ContentQueryMain.xsl.
    -->
		<xsl:variable name="tableEnd">
			<xsl:if test="$CurPos = $Last">
				<![CDATA[ </table> ]]>
			</xsl:if>
		</xsl:variable>

		<!-- 
      Always emit the contents of tableStart.  If this is not the first
      row passed to us by ContentQueryMain.xsl, then we know its value
      will be blank.
      
      Disable output escaping because when tableStart it not blank, it
      includes actual HTML that we want to be rendered by the browser.  If
      we don't tell the XSL parser to disable output escaping, it will generate
      stuff like "&lt;table&gt;" instead of "<table>".
    -->
		<xsl:value-of select="$tableStart" disable-output-escaping="yes"/>
		<tr>
			<xsl:if test="$CurPos mod 2 = 0" ddwrt:cf_ignore="1">
				<xsl:attribute name="class">ms-alternating</xsl:attribute>
			</xsl:if>
			<td>
				<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
				<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
					<xsl:value-of select="@Title" />
				</a>
			</td>
			<td align="left">
				<xsl:value-of select="ddwrt:FormatDate(string(@StartDate) ,1033 ,1)"/>
			</td>
			<td align="left">
				<xsl:value-of select="ddwrt:FormatDate(string(@EndDate1) ,1033 ,1)"/>
			</td>
			<td align="left">
				<xsl:value-of select="@ScheduleStatus" />
			</td>

			<td align="left">
				<xsl:value-of select="format-number(@PercentComplete, &quot;#,##0.%;-#,##0.%&quot;)" />
			</td>

			<!-- 
        All of the following is commented out to clarify things.
        However, bring it back and stuff it into a <td> to see its 
        effect.
      -->
			<!--
        <div id="linkitem" class="item">
          <xsl:if test="string-length($SafeImageUrl) != 0">
            <div class="image-area-left">
              <a href="{$SafeLinkUrl}" target="{$LinkTarget}">
                <img class="image-fixed-width" src="{$SafeImageUrl}"                      alt="{@ImageUrlAltText}"/>
              </a>
            </div>
          </xsl:if>
          <div class="link-item">
            <xsl:call-template                  name="OuterTemplate.CallPresenceStatusIconTemplate"/>
            <a href="{$SafeLinkUrl}"                    target="{$LinkTarget}" title="{@LinkToolTip}">
              <xsl:value-of select="$DisplayTitle"/>
            </a>
            <div class="description">
              <xsl:value-of select="@Description" />
            </div>

          </div>

        </div>

-->
		</tr>

		<!-- 
      Emit the closing table tag.  If we are not on the last row,
      this will be blank.
    -->
		<xsl:value-of select="$tableEnd" disable-output-escaping="yes"/>

	</xsl:template>

	<xsl:template name="PltITProjectsMilestones" match="Row[@Style='PltITProjectsMilestones']" mode="itemstyle">
		<xsl:variable name="SafeImageUrl">
			<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
				<xsl:with-param name="UrlColumnName" select="'ImageUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="SafeLinkUrl">
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item">
			<xsl:if test="string-length($SafeImageUrl) != 0">
				<div class="image-area-left">
					<a href="{$SafeLinkUrl}" target="{$LinkTarget}">
						<img class="image-fixed-width"
						  src="{$SafeImageUrl}" alt="{@ImageUrlAltText}" />
					</a>
				</div>
			</xsl:if>
			<div class="link-item">
				<div class="description">
					<table style="width: 350px" cellspacing="1">
						<tr>
							<td style="width: 109px">
								<strong>Milestone:</strong>
							</td>
							<td>
								<xsl:value-of select="@Title" />
							</td>
						</tr>
						<tr>
							<td style="width: 109px">
								<strong>Start Date:</strong>
							</td>
							<td>
								<xsl:value-of select="ddwrt:FormatDate(string(@StartDate) ,1033 ,3)"/>
							</td>
						</tr>
						<tr>
							<td style="width: 109px">
								<strong>End Date:</strong>
							</td>
							<td>
								<xsl:value-of select="ddwrt:FormatDate(string(@EndDate) ,1033 ,3)"/>
							</td>
						</tr>
						<tr>
							<td style="width: 109px">
								<strong>% Complete:</strong>
							</td>
							<td>
								<xsl:value-of select="format-number(@PercentComplete, &quot;#,##0.%;-#,##0.%&quot;)" />
							</td>
						</tr>
						<tr>
							<td style="width: 109px">
								<strong>Status:</strong>
							</td>
							<td>
								<xsl:value-of select="@ScheduleStatus" />
							</td>
						</tr>
						<tr>
							<td style="width: 109px"></td>
							<td>
								<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
								<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">Go To Item</a>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</xsl:template>

	<xsl:template name="SharePointAceItemStyle" match="Row[@Style='SharePointAceItemStyle']" mode="itemstyle">
		<xsl:variable name="SafeLinkUrl">
			<!--
            <xsl:call-template name="OuterTemplate.GetSafeLink">
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
            -->
			<!-- custom link to calendar event -->
			<xsl:call-template name="OuterTemplate.GetSafeLink">
				<xsl:with-param name="UrlColumnName" select="'LinkToCalendarItem'"/>
			</xsl:call-template>

		</xsl:variable>
		<xsl:variable name="DisplayTitle">
			<xsl:call-template name="OuterTemplate.GetTitle">
				<xsl:with-param name="Title" select="@Title"/>
				<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
			</xsl:call-template>
		</xsl:variable>
		<xsl:value-of  select="ddwrt:FormatDate(string(@EventDate) ,1033 ,3)"/>
		<br/>
		<xsl:variable name="LinkTarget">
			<xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
		</xsl:variable>
		<div id="linkitem" class="item link-item">
			<xsl:call-template name="OuterTemplate.CallPresenceStatusIconTemplate"/>
			<a href="{$SafeLinkUrl}" target="{$LinkTarget}" title="{@LinkToolTip}">
				<xsl:value-of select="$DisplayTitle"/>
			</a>
		</div>
	</xsl:template>

</xsl:stylesheet>
